<?php
class GetFiles
{
    protected $_at;

    public function getAllGaleriaFiles()
    {
        $files = array();
        $handler = opendir($documentRoot . 'Images');

        while($file= readdir($handler)) {
            if("." != $file && ".." != $file) {
                    $files[] = $file;
            }
        }
        $this->getAt()->assign('files', $files);
//        $mySmarty->assign('files', $files);
    }

    /**
     * @return Smarty
     */
    public function getAt()
    {
        if (!$this->_at) {
            $this->_at = Controller::getInstance()->at();
        }
        return $this->_at;
    }

    public function setAt($at) {
        $this->_at = $at;
    }
}
	
	
